package com.hk.service;

import java.util.ArrayList;
import com.hk.dtos.ReplyDto;
import com.hk.ibatis.SqlDaoSuport;
import com.hk.idtos.IReplyDto;

public class ReplyManager extends SqlDaoSuport implements IReplyDto {
	public void reply_insBoard(ReplyDto rd){
		
		try {
			this.getSqlMapClient().insert("reply_insBoard",rd);
		} catch (Exception e) {
			System.out.println(e);
		}		 
		
	} //getAnswerBoard

	@Override
	public ArrayList<ReplyDto> replyCount(int bid) {
		ArrayList<ReplyDto> result=null;
		try {
			result=(ArrayList<ReplyDto>)this.getSqlMapClient().queryForList("replyCount",bid);
		} catch (Exception e) {
			System.out.println(e);
		}	
		return result;
	}

	@Override
	public ArrayList<ReplyDto> reGetBoards(ReplyDto val) {
		ArrayList<ReplyDto> result=null;
		try {
			result=(ArrayList<ReplyDto>)this.getSqlMapClient().queryForList("reGetBoards",val);
		} catch (Exception e) {
			System.out.println(e);
		}	
		
		
		return result;
	}
}
